﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace PlatformNetCore.Entity
{
    [Table("Jobs")]
    public class Jobs
    {
        [Key]
        [MaxLength(50)]
        public string ID { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        [MaxLength(200)]
        public string Title { get; set; }
        /// <summary>
        /// 职位类型ID
        /// </summary>
        [MaxLength(50)]
        public string PositionID { get; set; }
        /// <summary>
        /// 职能类型ID
        /// </summary>
        [MaxLength(50)]
        public string JobID { get; set; }
        /// <summary>
        /// 工作地点
        /// </summary>
        [MaxLength(50)]
        public string Address { get; set; }
        /// <summary>
        /// 部门
        /// </summary>
        [MaxLength(50)]
        public string Department { get; set; }
        /// <summary>
        /// 招聘人数
        /// </summary>
        public int JobNumber { get; set; }
        /// <summary>
        /// 发布时间
        /// </summary>
        public Nullable<DateTime> PublishDate { get; set; }
        /// <summary>
        /// 摘要
        /// </summary>
        [MaxLength(500)]
        public string Remark { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        public int SortNo { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public int IsAvailable { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public int IsDel { get; set; }
        [MaxLength(50)]
        public string AddBy { get; set; }
        public Nullable<DateTime> AddDate { get; set; }
        [MaxLength(50)]
        public string UpdateBy { get; set; }
        public Nullable<DateTime> UpdateDate { get; set; }

        #region 关联
        [ForeignKey("PositionID")]
        public virtual Category Position { get; set; }
        [ForeignKey("JobID")]
        public virtual Category Job { get; set; }
        #endregion
    }
}
